package com.veiga.sistema.primefaces;

import java.io.IOException;
import java.io.InputStream;

public interface UploadedFile {

        public String getFileName();
        
        public InputStream getInputstream() throws IOException;
        
        public long getSize();
        
        public byte[] getContents();
        
        public String getContentType();
    
    /**
     * Writes the uploaded file to the given file path.
     *
     * @param filePath The target file path.
     * @throws Exception If something went wrong.
     */
    public void write(String filePath) throws Exception;
}